package main

import (
	"database/sql"
	"gorm.io/gorm"
	"time"
)

type Model struct {
	UUID uint      `gorm:"primaryKey"`
	Time time.Time `gorm:"column:my_time"`
}
type TestUser struct {
	Model
	Name         string  `gorm:"default:qm"`
	Email        *string `gorm:"not null"`
	Age          uint8   `gorm:"comment:年龄"`
	Birthday     *time.Time
	MemberNumber sql.NullString
	ActivatedAt  sql.NullTime
}
type User struct {
	gorm.Model
	Name string `gorm:"default:qm"`
	Age  uint8  `gorm:"comment:年龄"`
}

func TesTableCreate() {
	GDB.AutoMigrate(&TestUser{})
	GDB.AutoMigrate(&User{})
}
